package com.dayu.design.创建型.抽象工厂模式;

import com.dayu.design.common.ActionEnum;
import com.dayu.design.common.FactoryEnum;

/**
 * @author dayu
 * @create 2023-12-01 14:30
 */
public class MainTest {
    public static void main(String[] args) throws IllegalAccessException, InstantiationException {
        AbstractFactory factory = FactoryEnum.ACTION.getClazz().newInstance();
        factory.getAction(ActionEnum.CHICKEN).eat();
        factory.getAction(ActionEnum.PORK).eat();
    }
}
